/*==============================================================================
 *
 * Chris Rigg and Sam Strom
 *
 * ECEN 5033
 *
 * Spring 2008
 *
 */

#ifndef _FRAME_PARSE_H
#define _FRAME_PARSE_H

#define WIDTH 640
#define HEIGHT 480

#define CENTER_OFFSET 20

#define RED 0
#define GREEN 1
#define BLUE 2

unsigned int endian_swap(unsigned int x);
void filter(unsigned char *buffer, int width, int height, unsigned char lower, unsigned char upper);
void filter_color(int *buffer, int width, int heigth, int color);

double find_center(void *buffer, unsigned char r_l, unsigned char r_h, unsigned char g_l, unsigned char g_h, unsigned char b_l, unsigned char b_h, int width, int height, int *x, int *y);
void add_crosshairs(int *buffer, int width, int height, int x_cross, int y_cross);

void save_frame (const void *data, int width, int height, int id);
void save_frame_readable (const void *data, int width, int height, int id);

// probably not used
//void get_red_buffer(char *buffer, int width, int height);
//void add_block(char *buffer, int width, int height, int x_start, int y_start, int b_width, int b_height);
//void read_ppm(char *buffer, char *filename, int width, int height);
//void write_ppm(char *buffer, char *filename, int width, int height);


#endif // _FRAME_PARSE_H
